/**
 * 
 */
package com.p2p.base.model;

/**
 * @author ruiqi
 *
 */
public class ValidateCodeSend {
	
	public enum SendTypeEnum{
		SMS,
		EMAIL,
		;
	}
	
	public enum SendEmailTypeEnum{
		TYPE_NEWEMAIL(0),//修改邮箱时给新邮箱发送邮件
		//TYPE_GETPWD(0),//找回登录密码时发送
		TYPE_GETPWD(1),//找回密码时发送
		//TYPE_AUTH(2),//邮箱认证时发送邮件
		TYPE_OLDEMAIL(3),//修改邮箱时给旧邮箱发送邮件
		TYPE_MODIFYMOBILE(4),//修改手机时发送邮件
		;
		private int index;
		private SendEmailTypeEnum(int index) {
			this.index = index;
		}
		public int getIndex() {
			return index;
		}
	}
	
	public enum SendSMSTypeEnum{
		TYPE_REGISTER(0),//注册时发送短信验证码
		TYPE_GETPWD(1),//找回密码时发送短信验证码
		//TYPE_AUTH(2),//手机认证时发送短信验证码
		TYPE_MODIFYEMAIL(3),//修改邮箱时发送短信验证码
		TYPE_MODIFYPHONE(4),//修改手机时发送短信验证码
		TYPE_LOGIN(5),//验证码登陆
		;
		private int index;
		private SendSMSTypeEnum(int index) {
			this.index = index;
		}
		public int getIndex() {
			return index;
		}
	}
	public static void main(String[] args) {
		System.out.println(BizTypeEnum.Common.getSubject());
		System.out.println(BizTypeEnum.MailBindingForGetPwd.getSubject());
	}
	public enum BizTypeEnum{
		Other("自定义内容模板"),
		//MailCheck(""),
		MailBinding("正在邮箱绑定，验证码是${checkCode}"),
		//MobileCheck(""),
		MobileBinding("正在使用手机注册，验证码是${checkCode}"),
		MobileBindingForLogin("正在使用手机登陆，验证码是${checkCode}"),
		MobileBindingForGetPwd("您发送了手机找回密码的请求，验证码是${checkCode}"),
		MobileBindingForModifyMobile("您发送了修改手机的请求，验证码是${checkCode}"),
		MobileBindingForModifyEmail("您正在通过手机修改邮箱，验证码是${checkCode}"),
		
		MailForModifyMobile("您通过邮件发送了修改手机的请求，验证码是${checkCode}","修改手机"),
		MailForModifyEmail("您通过邮件发送了修改邮箱的请求，验证码是${checkCode}","修改邮箱"),
		MailBindingForGetPwd("您发送了邮件找回密码的请求，验证码是${checkCode}","找回密码"),
		Common("验证码是${checkCode}","邮箱接收验证码"),
		;
		private String content;
		private String subject;
		private BizTypeEnum(String content){
			this.content=content;
			this.subject=null;
		}
		private BizTypeEnum(String content,String subject) {
			this.content = content;
			this.subject=subject;
		}
		public String getContent() {
			return content;
		}
		public String getSubject() {
			return subject;
		}
		
	}
	
	
	

	/**
	 * 发送标识，手机号码或者邮箱全名
	 */
	private String sendIdentity;
	
	/**
	 * 发送类型，目前只有手机和email
	 */
	private SendTypeEnum sendType;
	
	/**
	 * 业务类型
	 */
	private BizTypeEnum bizType;
	
	/**
	 * 内容模板，bizType没有对应类型，直接传模板内容
	 */
	private String contentTemplate;
	
	/**
	 * 其他业务的业务名字标识
	 */
	private String otherBizName;
	
	/**
	 * 有效时间
	 */
	private int effectMinute;


	public String getSendIdentity() {
		return sendIdentity;
	}

	public void setSendIdentity(String sendIdentity) {
		this.sendIdentity = sendIdentity;
	}

	public SendTypeEnum getSendType() {
		return sendType;
	}

	public void setSendType(SendTypeEnum sendType) {
		this.sendType = sendType;
	}

	public BizTypeEnum getBizType() {
		return bizType;
	}

	public void setBizType(BizTypeEnum bizType) {
		this.bizType = bizType;
	}

	public String getContentTemplate() {
		return contentTemplate;
	}

	public void setContentTemplate(String contentTemplate) {
		this.contentTemplate = contentTemplate;
	}

	public int getEffectMinute() {
		return effectMinute;
	}

	public void setEffectMinute(int effectMinute) {
		this.effectMinute = effectMinute;
	}

	public String getOtherBizName() {
		return otherBizName;
	}

	public void setOtherBizName(String otherBizName) {
		this.otherBizName = otherBizName;
	}
	
	
}
